public class Solution2042 {
    public boolean areNumbersAscending(String s) {
        String[] k=s.split(" ");
        int last=0;
        for (String s1 : k) {
            if (s1.length()>0 && s1.charAt(0)>='0' && s1.charAt(0)<='9'){
                int t=Integer.parseInt(s1);
                if (t<=last){
                    return false;
                }
                last=t;
            }
        }
        return true;
    }

    public static void main(String[] args) {
        System.out.println(new Solution2042().areNumbersAscending("1 box has 3 blue 4 red 6 green and 12 yellow marbles"));
    }
}
